<script>
	import { Usercenter } from '@/api/User.js';
	export default {
		globalData: {
			safeAreaInsets: {},
		},
		onLaunch: async function ({}) {
			uni.getSystemInfo({
				success: (res) => {
					this.globalData.safeAreaInsets = res.safeAreaInsets;
				},
			});
			const { data } = await Usercenter();
			uni.setStorageSync('loginData', data);
		},
		onShow: function () {
			
			
		},
		onHide: function () {
			console.log('App Hide');
		},
	};
</script>

<style lang="scss">
	// @import "colorui/main.css";
	// @import "colorui/icon.css";
	.flex {
		display: flex;
	}
	.spaceAround {
		display: flex;
		justify-content: space-around;
	}
	.spaceBetween {
		display: flex;
		justify-content: space-between;
	}
	.spaceEvenly {
		display: flex;
		justify-content: space-evenly;
	}
	.bg {
		position: absolute;
		z-index: 1;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}

	.subjectColor {
		color: $price-color;
	}

	.subjectBgColor {
		background-color: $price-color;
	}

	/*每个页面公共css */
	view {
		font-family: Source Han Sans CN, Source Han Sans CN;
		font-weight: 400;
		// color: $title-colcor;
	}

	.pageBg {
		width: 100%;
		min-height: 100vh;
		background: $uni-pagecolor;
		overflow: hidden;
		padding-bottom: calc($pageBottom + 30rpx);
	}

	// 对父元素居中
	.imgcentent {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		margin: auto;
	}
	// 子元素居中
	.centerSubElements {
		display: flex;
		align-items: center;
		justify-content: center;
	}
	// 水平对齐
	.verticalMiddle {
		display: inline-block;
		vertical-align: middle;
	}

	view {
		font-family: Source Han Sans CN, Source Han Sans CN;
		font-weight: 400;
	}

	// 超出1行显示...
	.ellipsis {
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	// 超出3行显示...
	.clamp {
		word-break: break-all;
		white-space: pre-wrap;
		overflow: hidden;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		text-overflow: ellipsis; /* 显示省略号 */
	}

	.left {
		float: left;
	}

	.right {
		float: right;
	}

	.flex {
		display: flex;
	}

	.btnview {
		text-align: center;

		background-color: $price-color;
		color: $txt-color;
	}
	.no-border {
		border: none !important;
	}
	
</style>
